#ifndef TEXTURE_H
#define TEXTURE_H

#include "TextureLoader.h"
#include <string>

#include <GL/gl.h>
#include <GL/glu.h>

#ifdef GL_TEXTURE_2D_BINDING
#define GL_TEXTURE_BINDING_2D GL_TEXTURE_2D_BINDING
#endif
#ifdef GL_TEXTURE_BINDING_2D
#define GL_TEXTURE_2D_BINDING GL_TEXTURE_BINDING_2D
#endif

class Texture
{
	unsigned int m_Texture;
	std::string m_filename;
	bool m_Loaded;

public:
	Texture( const std::string& filename );
	Texture();

	void setFilename(const std::string& filename )
	{
		m_filename = filename;
	}

	bool isValid()
	{
		return m_filename.length() > 0;
	}

	void forceReload()
	{
		m_Loaded = false;
	}

	void bind();

	void unbind();
};

#endif